<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="下一站旅行 酒店 机票  xiayizhan 下一站">
<meta http-equiv="description" content="下一站旅行 酒店 机票  xiayizhan 下一站">
<title>主页 - 酒店预订 机票www.ixiayizhan.com</title>
<style type="text/css">
body, html{width: 100%;height: 100%;overflow: hidden;margin:0;}
#allmap {height: 100%;overflow: hidden;}
#result {border-left:1px dotted #999;height:100%;width:295px;position:absolute;top:0px;right:0px;font-size:12px;}
dl,dt,dd,ul,li{
    margin:0;
    padding:0;
    list-style:none;
}
dt{
    font-size:14px;
    font-family:"微软雅黑";
    font-weight:bold;
    border-bottom:1px dotted #000;
    padding:5px 0 5px 5px;
    margin:5px 0;
}
dd{
    padding:5px 0 0 5px;
}
li{
    line-height:28px;
}
</style>
<script src="${ctx}/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=58be7e17efa577f507312e4df55a99a3
"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
</head>
<body>
<div id="allmap" style="overflow:hidden;zoom:1;position:relative;">	
    <div id="map" style="height:100%;width:100%;-webkit-transition: all 0.5s ease-in-out;transition: all 0.5s ease-in-out;"></div>
    <div id="showPanelBtn" style="position:absolute;font-size:14px;top:50%;margin-top:-95px;right:0px;width:20px;padding:10px 10px;color:#999;cursor:pointer;text-align:center;height:170px;background:rgba(255,255,255,0.9);-webkit-transition: all 0.5s ease-in-out;transition: all 0.5s ease-in-out;font-family:'微软雅黑';font-weight:bold;">显示检索结果面板<br/>&lt;</div>
    <div id="panelWrap" style="width:0px;position:absolute;top:0px;right:0px;height:100%;overflow:auto;-webkit-transition: all 0.5s ease-in-out;transition: all 0.5s ease-in-out;">
        <div style="width:20px;height:200px;margin:-100px 0 0 -10px;color:#999;position:absolute;opacity:0.5;top:50%;left:50%;">无查询结果</div>
        <div id="panel" style="position:absolute;"></div>
    </div>
</div>
<script type="text/javascript">
/* $(function(){
	showmap(116.307852,40.057031,"百度大厦","北京市海淀区上地十街10号","(010)59928888","百度大厦位于北京市海淀区西二旗地铁站附近，为百度公司综合研发及办公总部。");

}) */
	function showmap(longitude,latitude,title,address,phone,introduce,imgpath){
	var map = new BMap.Map('map');
	    var poi = new BMap.Point(longitude,latitude);
	    map.centerAndZoom(poi, 16);
	    map.enableScrollWheelZoom();
	    var content = '<div style="margin:0;line-height:20px;padding:2px;">' +
	                    '<img src="'+imgpath+'" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;"/>' +
	                    '地址：'+address+'<br/>电话：'+phone+'<br/>简介：' +introduce+
	                  '</div>';

	    //创建检索信息窗口对象
	    var searchInfoWindow = null;
		searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
				title  : title,      //标题
				width  : 290,             //宽度
				height : 105,              //高度
				panel  : "panel",         //检索结果面板
				enableAutoPan : true,     //自动平移
				searchTypes   :[
					BMAPLIB_TAB_SEARCH,   //周边检索
					BMAPLIB_TAB_TO_HERE,  //到这里去
					BMAPLIB_TAB_FROM_HERE //从这里出发
				]
			});
	    var marker = new BMap.Marker(poi); //创建marker对象
	    //marker.enableDragging(); //marker可拖拽
	    marker.addEventListener("click", function(e){
		    searchInfoWindow.open(marker);
	    })
	    map.addOverlay(marker); //在地图中添加marker
	    map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件
	    map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL}));  //右上角，仅包含平移和缩放按钮
	    map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT, type: BMAP_NAVIGATION_CONTROL_PAN}));  //左下角，仅包含平移按钮
	    map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, type: BMAP_NAVIGATION_CONTROL_ZOOM}));  //右下角，仅包含缩放按钮

	    searchInfoWindow.open(marker); //在marker上打开检索信息串口
	}
    
    var isPanelShow = false;
    //显示结果面板动作
    $("#showPanelBtn").onclick = function(){
        if (isPanelShow == false) {
            isPanelShow = true;
            $("#showPanelBtn").style.right = "180px";
            $("#panelWrap").style.width = "180px";
            $("#map").style.marginRight = "180px";
            $("#showPanelBtn").innerHTML = "隐藏检索结果面板<br/>>";
        } else {
            isPanelShow = false;
            $("#showPanelBtn").style.right = "0px";
            $("#panelWrap").style.width = "0px";
            $("#map").style.marginRight = "0px";
            $("#showPanelBtn").innerHTML = "显示检索结果面板<br/><";
        }
    }
</script>
</body>
</html>